package com.gitee.liuzhi.common.util;

import java.util.StringJoiner;

/**
 * @Author liuzhi
 * @Date 2023/8/29 22:10
 * @Version 1.0
 * @Description 分组 Key 工具类
 */
public class GroupKeyUtil {

    public static final String DELIMITER = "_";

    public static String groupKey(Object ... obj) {
        StringJoiner sj = new StringJoiner(DELIMITER);
        int length = obj.length;
        for (int i = 0; i < length; i++) {
            sj.add("%s");
        }
        return String.format(sj.toString(), obj);
    }

}
